home *** CD-ROM | disk | FTP | other *** search
/ PC-SIG Library 8 / PC-SIG Library CD-ROM (8th Edition) (1990-04).iso / 201_300 / disk0258 / at.asm next >
Encoding:
Assembly Source File  |  1983-09-30  |  713 b   |  51 lines

  1.     page    ,132
  2. ; AT hhmm
  3. ;    Wait until hh:mm.
  4. ;
  5. cseg    segment    public 'code'
  6.     assume    cs:cseg,ds:cseg
  7.  
  8.     org    80h
  9.     dw    ?        ; length (5) and initial space
  10. hhi    db    ?
  11. hlo    db    ?
  12. mhi    db    ?
  13. mlo    db    ?
  14.  
  15.     org    100h
  16. AT    proc    far
  17.     mov    cl,10        ; set up for multiplies
  18.     mov    al,hhi        ; get hours in bh
  19.     and    al,0FFh-'0'
  20.     mul    cl
  21.     mov    bh,al
  22.     mov    al,hlo
  23.     and    al,0FFh-'0'
  24.     add    bh,al
  25.     mov    al,mhi        ; get minutes in bl
  26.     and    al,0FFh-'0'
  27.     mul    cl
  28.     mov    bl,al
  29.     mov    al,mlo
  30.     and    al,0FFh-'0'
  31.     add    bl,al
  32.     mov    athm,bx
  33.  
  34. loop:    mov    ah,2Ch        ; get time
  35.     int    21h        ; ch,cl= h,m; dh,dl= s,c
  36.     cmp    ch,ath
  37.     jne    loop
  38.     cmp    cl,atm
  39.     jl    loop
  40.     int    20h        ; exit
  41.  
  42.     even
  43. athm    dw    ?
  44.     org    $-2
  45. atm    db    ?
  46. ath    db    ?
  47.  
  48. AT    endp
  49. cseg    ends
  50.     end    AT
  51.